#include <stdio.h>
#include <conio.h>
void main ()
	{
	float vector[20]={5,2,-10,-3,3,4,-4,-2,1,6,-7,-6,-8,-1,7,8,-9,9,-5,10};
	int i, j, auxp, auxn;
	clrscr();
	printf("Vector Original\n");
	for (i=0;i<20;i++)
		{
		printf("      %6.2f\n", vector[i]);
		}
	/* ORDENA POSITIVOS DE MAYOR A MENOR */
	for (i=0;i<20-1;i++)
		{
		for (j=i+1;j<20;j++)
			{
			if(vector[j]>vector[i])
				{
				auxp=vector[i];
				vector[i]=vector[j];
				vector[j]=auxp;
				}
			}
		}
	printf(" Numero positivos decreciente\n");
	for (i=0;i<20-1;i++)
	{
	if (vector[i]>0)
		printf("      %6.2f\n", vector[i]);
	}

	/* ORDENA NEGATIVOS DE MENOR A MAYOR */
	for (i=0;i<20-1;i++)
		{
		for (j=i+1;j<20;j++)
			{
			if(vector[j]<vector[i])
				{
				auxn=vector[i];
				vector[i]=vector[j];
				vector[j]=auxn;

				}
			}
		}
	printf(" Numero negativos creciente\n");
	for (i=0;i<20-1;i++)
		{
		if (vector[i]<0)
			printf("      %6.2f\n", vector[i]);
		}
	getch();
	}